﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category7
{
  public class MT767 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagDefinition U0017;

    [Description("Sequence Of Total")]
    public Tag27 SequenceOfTotal_27
    {
      get
      {
        return new Tag27((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0002);
      }
    }

    [Description("Sequence Of Total")]
    public Tag27 Tag27_SequenceOfTotal
    {
      get
      {
        return this.SequenceOfTotal_27;
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0005);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0007);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Further Identification")]
    public MT767.Tag23 FurtherIdentification_23
    {
      get
      {
        return new MT767.Tag23((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U000E);
      }
    }

    [Description("Further Identification")]
    public MT767.Tag23 Tag23_FurtherIdentification
    {
      get
      {
        return this.FurtherIdentification_23;
      }
    }

    [Description("Date")]
    public Tag30 Date_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0010);
      }
    }

    [Description("Date")]
    public Tag30 Tag30_Date
    {
      get
      {
        return this.Date_30;
      }
    }

    [Description("Number Of Amendment")]
    public Tag26E NumberOfAmendment_26E
    {
      get
      {
        return new Tag26E((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0012);
      }
    }

    [Description("Number Of Amendment")]
    public Tag26E Tag26E_NumberOfAmendment
    {
      get
      {
        return this.NumberOfAmendment_26E;
      }
    }

    [Description("Date Of Issue Or Request To Issue")]
    public Tag31C DateOfIssueOrRequestToIssue_31C
    {
      get
      {
        return new Tag31C((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0014);
      }
    }

    [Description("Date Of Issue Or Request To Issue")]
    public Tag31C Tag31C_DateOfIssueOrRequestToIssue
    {
      get
      {
        return this.DateOfIssueOrRequestToIssue_31C;
      }
    }

    [Description("Amendment Details")]
    public Tag77C AmendmentDetails_77C
    {
      get
      {
        return new Tag77C((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0016);
      }
    }

    [Description("Amendment Details")]
    public Tag77C Tag77C_AmendmentDetails
    {
      get
      {
        return this.AmendmentDetails_77C;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT767.U0017);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT767()
      : base(true)
    {
    }

    public MT767(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT767.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT767.MessageDefinition = new SwiftMessageDefinition("MT767", "Guarantee/Standby Letter of Credit Amendment");
      MT767.U0002 = new SwiftTagDefinition("SequenceOfTotal_27", "Sequence Of Total");
      MT767.U0002.TagName = ":27:";
      MT767.U0003 = new SwiftTagSubItemDefinition("Number", "Number");
      MT767.U0002.Elements.Add((SwiftDefinitionElement) MT767.U0003);
      MT767.U0004 = new SwiftTagSubItemDefinition("Total", "Total");
      MT767.U0002.Elements.Add((SwiftDefinitionElement) MT767.U0004);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0002);
      MT767.U0005 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT767.U0005.TagName = ":20:";
      MT767.U0006 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT767.U0005.Elements.Add((SwiftDefinitionElement) MT767.U0006);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0005);
      MT767.U0007 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT767.U0007.TagName = ":21:";
      MT767.U0008 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT767.U0007.Elements.Add((SwiftDefinitionElement) MT767.U0008);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0007);
      MT767.U000E = new SwiftTagDefinition("FurtherIdentification_23", "Further Identification");
      MT767.U000E.TagName = ":23:";
      MT767.U000F = new SwiftTagSubItemDefinition("FurtherIdentification", "Further Identiciation");
      MT767.U000E.Elements.Add((SwiftDefinitionElement) MT767.U000F);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U000E);
      MT767.U0010 = new SwiftTagDefinition("Date_30", "Date");
      MT767.U0010.TagName = ":30:";
      MT767.U0010.Mandatory = false;
      MT767.U0011 = new SwiftTagSubItemDefinition("Date", "Date");
      MT767.U0010.Elements.Add((SwiftDefinitionElement) MT767.U0011);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0010);
      MT767.U0012 = new SwiftTagDefinition("NumberOfAmendment_26E", "Number Of Amendment");
      MT767.U0012.TagName = ":26E:";
      MT767.U0012.Mandatory = false;
      MT767.U0013 = new SwiftTagSubItemDefinition("Number", "Number Of Amendment");
      MT767.U0012.Elements.Add((SwiftDefinitionElement) MT767.U0013);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0012);
      MT767.U0014 = new SwiftTagDefinition("DateOfIssueOrRequestToIssue_31C", "Date Of Issue Or Request To Issue");
      MT767.U0014.TagName = ":31C:";
      MT767.U0015 = new SwiftTagSubItemDefinition("Date", "Date");
      MT767.U0014.Elements.Add((SwiftDefinitionElement) MT767.U0015);
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0014);
      MT767.U0016 = new SwiftTagDefinition("AmendmentDetails_77C", "Amendment Details");
      MT767.U0016.TagName = ":77C:";
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0016);
      MT767.U0017 = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT767.U0017.TagName = ":72:";
      MT767.U0017.Mandatory = false;
      MT767.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT767.U0017);
    }

    public class Tag23 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("23", value);
        }
      }

      internal Tag23(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
